<ul class="list-group">
    @foreach($replies as $reply)
        <li class="list-group-item border-top-0 border-end-0 border-start-0
                             d-flex justify-content-between align-items-center
                             ">
            <div class="d-flex justify-content-start align-items-center">
                <a href="{{route('users.show',$reply->user_id)}}" class=" flex-shrink-0">
                    <img class="img-thumbnail" width="54"
                         src="{{$reply->user->avatar}}"
                         alt="{{$reply->user->name}}">
                </a>
                <div class="px-3 d-flex flex-column justify-content-center ">
                    <div class="">
                        <a href="{{route('users.show',$reply->user_id)}}" class="text-decoration-none">
                            {{$reply->user->name}}
                        </a>
                        <span>&nbsp;•&nbsp;</span>
                        <small class="text-secondary">
                            <i class="fa fa-regular fa-clock"></i>
                            {{$reply->created_at->diffForHumans()}}
                        </small>
                    </div>
                    <div>
                        {!! $reply->content !!}
                    </div>
                </div>
            </div>
            <div>
                @can('destroy',$reply)
                    <form action="{{route('replies.destroy',$reply->id)}}" method="POST">
                        @csrf
                        {{method_field('DELETE')}}
                        <button type="submit" class="btn btn-sm btn-outline-danger">
                            <i class="fa fa-trash-alt "></i>
                        </button>
                    </form>
                @endcan
            </div>
        </li>
    @endforeach
</ul>
@include('shared._pages',['list'=>$replies])
